package com.common.frame.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class GsonUtils {

    private static volatile Gson gson;

    public static Gson getGson(){
        if (gson == null){
            synchronized (GsonUtils.class){
                if (gson == null){
                    gson = new GsonBuilder().setLenient().serializeSpecialFloatingPointValues().create();
                }
            }
        }
        return gson;
    }
}
